package com.cy.aircompressor.api;

import com.cy.aircompressor.entity.compressor.Compressor;
import com.cy.aircompressor.entity.sensor.SensorLatestData;
import com.drug.lib.view.recycptr.bean.RowEntity;
import com.net.model.bean.BaseResponse;

import java.util.List;

import io.reactivex.Flowable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface AirApi {

    @POST("compressor/add")
    Flowable<BaseResponse<Object>> addCompressor(@Body() Object parameters);

    /**
     * 空压机分页查询
     *
     * @param pageNum        当前页码
     * @param pageSize       每页条数
     * @param powerStationId 电站id
     * @param sn             空压机编号
     * @return
     */
    @GET("compressor/queryPage")
    Flowable<BaseResponse<RowEntity<Compressor>>> compressor(@Query("pageNum") Integer pageNum, @Query("pageSize") Integer pageSize,
                                                             @Query("powerStationId") String powerStationId, @Query("sn") String sn);


    /**
     * 空压机最新数据(cidList为空压机id集合)
     *
     * @param pram
     * @return
     */
    @GET("sensorDataAgg/queryCompressorSensorData")
    Flowable<BaseResponse<List<SensorLatestData>>> queryCompressorSensorData(@Query(value = "cidList") List<String> pram);
}
